Skip to main content

Block account

POST /api/v1/Accounts/block

Description

This endpoint is used to block an account. Blocking an account restricts its access and usage.

Request

  • Path Parameters:

    • version: API version (string)
  • Headers:

    • Accept-Language: Change default response message language from English(en). Available languages fr,en
  • Request Body:

    • BlockAccountRequest: Represents the request to block an account (object)

Responses

  • 200: Success. Returns a StringResponse.

  • 400: Bad Request. The request is not valid.

Examples

Request

httpCopy codePOST /api/v{version}/Accounts/block HTTP/1.1
Host: example.com
Accept-Language: en
Content-Type: application/json
{
"accountId": "1234",
"reason": "Account owner reported fraudulent activity",
"notes": "The account owner reported unauthorized transactions on their account."
}

Response

httpCopy codeHTTP/1.1 200 OK
{
"message": "The account has been successfully blocked."
}

Error Response

httpCopy codeHTTP/1.1 400 Bad Request
{
"message": "Invalid account ID."
}

/api/v`{{version}}`/Accounts/block

Headers

Content-TypeValue
Accept-Language

Headers

Content-TypeValue
Content-Typeapplication/json

Headers

Content-TypeValue
Accepttext/plain

Body (raw)

{
"accountNumber": `<string>`,
"status": 3,
"reason": `<string>`
}

Response: 200

{
"succeeded": `<boolean>`,
"message": `<string>`,
"errors": [
`<string>`,
`<string>`
],
"data": `<string>`
}

Response: 400

{
"succeeded": `<boolean>`,
"message": `<string>`,
"errors": [
`<string>`,
`<string>`
],
"data": `<string>`
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /api/v1/Accounts/block \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!